/*
 * @Author: fangshengchu
 * @Date: 2024-05-07 14:06:57
 * @LastEditTime: 2024-06-12 10:52:40
 * @LastEditors: fangshengchu
 * @Description: 采购到货表格列
 * @FilePath: \szhk-fe\src\views\purchaseArrival\moduleCommon\formComp\baseFormConfig.ts
 */
export const formComponentConfig = {
  selectLike: () => import('./selectLike.vue'),
  dataRangePicker: () => import('./dataRangePicker.vue'),
  dataPicker: () => import('./dataPicker.vue'),
  searchSpecifications: () => import('../search-specifications/index.vue'),
  dictSelect: () => import('@/common/components/dict-select/index.vue'),
  inputModal: () => import('@/common/components/search-modal/input-modal.vue'),
  searchItemUser: () => import('@/common/components/search-modal/user.vue'),
  // userSelect: () => import('@/common/components/userAndDept/userModal.vue'),
};

export const formRenderConfig = {
  barcode: {
    label: '三码合一',
    field: 'barcode',
    componentName: 'input',
  },
  mateCode: {
    label: '机载产品物品码',
    field: 'mateCode',
    componentName: 'input',
  },
  produceSeq: {
    label: '机载产品序号',
    field: 'produceSeq',
    componentName: 'input',
  },
  fromUniteCode: {
    label: '机载产品交付单位',
    field: 'fromUniteCode',
    componentName: 'input',
  },
  prodModelnumber: {
    label: '机载产品产品型号',
    field: 'prodModelnumber',
    componentName: 'input',
  },
  airplanetype: {
    label: '机载产品所属机型',
    field: 'airplanetype',
    componentName: 'input',
  },
  createTimeStart: {
    label: '上传开始时间',
    field: 'createTimeStart',
    componentName: 'dataPicker',
    componentProps: {
      // showTime: true,
      // timePickerProps: {
      //   defaultValue: ['00:00:00', '00:00:00'],
      // },
    },
  },
  createTimeEnd: {
    label: '上传结束时间',
    field: 'createTimeEnd',
    componentName: 'dataPicker',
  },
  billNo: {
    label: '到货登记号',
    field: 'billNo',
    componentName: 'input',
  },
  orderNo3: {
    label: '合同号',
    field: 'orderNo',
    componentName: 'input',
  },
  // TODO: 未知字段
  paihaoInput: {
    label: '牌号',
    field: 'name',
    componentName: 'input',
  },
  parentModel: {
    label: '父型号',
    field: 'parentModel',
    componentName: 'inputModal',
    componentProps: {
      title: '父型号',
      type: 'materialCode',
      labelName: 'specification',
      valueName: 'specification',
    },
  },
  modelMark: {
    label: '牌号',
    field: 'modelMark',
    componentName: 'inputModal',
    componentProps: {
      title: '牌号',
      type: 'materialCode',
      labelName: 'modelMark',
      valueName: 'modelMark',
    },
  },
  tuhao: {
    label: '图号',
    field: 'tuhao',
    componentName: 'inputModal',
    componentProps: {
      title: '图号',
      type: 'materialCode',
      objKey: 'id',
    },
  },
  orderNo: {
    label: '订单号',
    field: 'orderNo',
    componentName: 'input',
  },
  daohuodengji: {
    label: '到货登记明细',
    field: 'batchFlag',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'registrationStatus',
    },
  },
  //  TODO: 未知字段需求号
  xuqiuhao: {
    label: '需求号',
    field: 'xuqiuhao',
    componentName: 'input',
  },
  mdsVendorId: {
    label: '供应商',
    field: 'mdsVendorId',
    componentName: 'inputModal',
    componentProps: {
      title: '供应商',
      type: 'supplyName',
      labelName: 'supplierChinese',
      valueName: 'id',
    },
  },
  mdsVendorCode2: {
    label: '供应商',
    field: 'mdsVendorCode',
    componentName: 'inputModal',
    componentProps: {
      title: '供应商',
      type: 'supplyName',
      labelName: 'supplierChinese',
      valueName: 'supplierCode',
    },
  },
  mdsItemCode: {
    label: '物料编码',
    field: 'mdsItemCode',
    componentName: 'inputModal',
    componentProps: {
      title: '物料编码',
      type: 'materialCode',
      labelName: 'materialCode',
      valueName: 'materialCode',
    },
  },
  figureNumber: {
    label: '图号',
    field: 'figureNumber',
    componentName: 'inputModal',
    componentProps: {
      title: '图号',
      type: 'materialCode',
      labelName: 'figureNumber',
      valueName: 'figureNumber',
    },
  },
  mdsItemName: {
    label: '物料名称',
    field: 'mdsItemName',
    componentName: 'input',
  },
  machineType: {
    label: '机型',
    field: 'machineType',
    componentName: 'inputModal',
    componentProps: {
      title: '机型',
      type: 'materialCode',
      labelName: 'materialCode',
      valueName: 'materialCode',
      defaultQuery: {
        // 机型
        materialType: '6',
        materialStatus: '1,3',
      },
    },
  },
  proMdsItemId: {
    label: '机型',
    field: 'proMdsItemId',
    componentName: 'inputModal',
    componentProps: {
      title: '机型',
      type: 'materialCode',
      labelName: 'materialName',
      valueName: 'id',
      defaultQuery: {
        // 机型
        materialType: '6',
        materialStatus: '1,3',
      },
    },
  },
  specification: {
    label: '规格',
    field: 'specification',
    componentName: 'inputModal',
    componentProps: {
      title: '规格',
      type: 'materialCode',
      labelName: 'specification',
      valueName: 'specification',
    },
  },
  //  TODO: 未知字段采购履行员
  user: {
    label: '采购履行员',
    field: 'name',
    componentName: 'searchItemUser',
    componentProps: {
      title: '采购履行员',
    },
  },
  //  TODO: 未知字段需求单位
  xuqiudanwei: {
    label: '需求单位',
    field: 'name',
    componentName: 'input',
    componentProps: {
      title: '需求单位',
      type: 'dept',
      key: 'deot',
    },
  },
  // name7: {
  //   label: '上传时间',
  //   field: 'name',
  //   componentName: 'input',
  // },
  // name7: {
  //   label: '上传时间',
  //   field: 'name',
  //   componentName: 'input',
  // },
  // name7: {
  //   label: '上传时间',
  //   field: 'name',
  //   componentName: 'input',
  // },
  // name7: {
  //   label: '上传时间',
  //   field: 'name',
  //   componentName: 'input',
  // },
  dataSourceType: {
    label: '数据来源',
    field: 'dataSourceType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'dataSources',
    },
  },
  xuqiulaiyuan: {
    label: '需求来源',
    field: 'xuqiulaiyuan',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'ARRIVL_TYP_CD',
    },
  },
  matecode: {
    label: '物品码',
    field: 'matecode',
    componentName: 'input',
  },
  modelnumber: {
    label: '产品型号',
    field: 'modelnumber',
    componentName: 'input',
  },
  supplierProd: {
    label: '承制单位代码',
    field: 'supplierProd',
    componentName: 'input',
  },
  suppliernameProd: {
    label: '承制单位名称',
    field: 'suppliernameProd',
    componentName: 'input',
  },
  orderNo1: {
    // 三码合一管理
    label: '商务合同编号',
    field: 'orderNo',
    componentName: 'input',
  },
  mdsVendorCode: {
    label: '供应商编码',
    field: 'mdsVendorCode',
    componentName: 'inputModal',
    componentProps: {
      title: '供应商编码',
      type: 'supplyName',
      labelName: 'supplierCode',
      valueName: 'supplierCode',
    },
  },
  mdsVendorName: {
    label: '供应商名称',
    field: 'mdsVendorName',
    componentName: 'input',
  },
  marqueS: {
    label: '型号',
    field: 'modelMark',
    componentName: 'inputModal',
    componentProps: {
      title: '型号',
      type: 'materialCode',
      labelName: 'modelMark',
      valueName: 'modelMark',
    },
  },
  fuMarqueS: {
    label: '父型号',
    field: 'parentModel',
    componentName: 'inputModal',
    componentProps: {
      title: '型号',
      type: 'materialCode',
      labelName: 'parentModel',
      valueName: 'parentModel',
    },
  },
  sysOrderNo: {
    label: '订单号',
    field: 'sysOrderNo',
    componentName: 'input',
  },
  barcode1: {
    // 三码合一管理
    label: '物料条码',
    field: 'barcode',
    componentName: 'input',
  },
  barcodeStatus: {
    label: '扫码状态',
    field: 'barcodeStatus',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'barcodeStatus',
    },
  },
  barScanItemResult: {
    label: '是否绑定物品码',
    field: 'barScanItemResult',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '是', value: 'Y' },
        { label: '否', value: 'N' },
      ],
    },
  },
  barScanProdResult: {
    label: '是否绑定机载单件码',
    field: 'barScanProdResult',
    componentName: 'select',
    componentProps: {
      options: [
        { label: '是', value: 'Y' },
        { label: '否', value: 'N' },
      ],
    },
  },
  scanImpUserId: {
    label: '扫描人',
    field: 'scanImpUserId',
    componentName: 'input',
  },
  scanImpDateBegin: {
    label: '扫描开始时间',
    field: 'scanImpDateBegin',
    componentName: 'dataPicker',
  },
  scanImpDateEnd: {
    label: '扫描结束时间',
    field: 'scanImpDateEnd',
    componentName: 'dataPicker',
  },
  marque: {
    label: '型号',
    field: 'marque',
    componentName: 'input',
  },
  itemSerialNo: {
    label: '件号',
    field: 'itemSerialNo',
    componentName: 'input',
  },
  orderType: {
    label: '订单类型',
    field: 'orderType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'orderType',
    },
  },
  planSourceType: {
    label: '需求来源',
    field: 'planSourceType',
    componentName: 'dictSelect',
    componentProps: {
      dictType: 'requireSourceType',
    },
  },
};
